#!/usr/local/bin/python
# -*- coding: utf-8 -*-


'''
    错误码声明
'''


#--错误码-----
g_map_error = {}

g_map_error["success"] = "成功"
g_map_error["sys_err"] = "系统错误"
g_map_error["pam_err"] = "参数错误"
g_map_error["unimplement"] = "功能未实现"


#--数值错误码--
g_map_error["not_gold"] = "您的金币不足, 攒点钱再来吧."
g_map_error["not_money"] = "您的比索不足, 攒点钱再来吧."

g_map_error["not_exp"] = "您的经验不足, 攒点经验再来吧"
g_map_error["not_courage"] = "您的勇气不足, 攒点勇气再来吧"      #勇气(消耗值,可自动恢复) 
g_map_error["not_power"] = "您的体力不足, 攒点体力再来吧"        #体力(消耗值,可自动恢复) 
g_map_error["not_quality"] = "提前看照片要消耗50人品/次, 您目前人品不足, 请努力升级吧."  #人品(消耗值,可自动恢复)
g_map_error["not_quality_steal_gold"] = "偷钱要消耗人品, 您的人品不足"  #人品(消耗值,可自动恢复)
g_map_error["not_power"] = "您的体力不足, 攒点体力再来吧"        #体力 
g_map_error["not_energy"] = "您的人缘不足，添加好友失败  \n\n（升级或者购买布丁可以增加人缘哦）"       #精力(人缘)
#--------------


g_map_error["user_is_null_owner"] = "您掉线咯, 请重新登录."
g_map_error["user_is_null"] = "用户不存在"
g_map_error["user_is_logining"] = "用户已经登录"
g_map_error["bad_request"] = "客户端请求参数错误"
g_map_error['no_uphead']  = '没上传头像'
g_map_error["exit_user"] = "用户已注册"

g_map_error["user_is_myself"] = "不能自己搭讪自己"
g_map_error["user_sex_same"] = "不能搭讪性别相同的用户"
g_map_error["user_is_busy"] = "对方刚被人搭讪成功.请重找一个人吧."
g_map_error["room_create_fail"] = "建立约会房间失败, 请稍候重试."
g_map_error["room_is_null"] = "约会房间已经解散, 请稍候重试."
g_map_error["room_is_busy"] = "约会房间续杯中, 无法插足哦, 请稍候重试."
g_map_error["room_is_busy_nobother"] = "他们使用了闲人免进道具, 无法插足哦."


g_map_error["is_attention_myself"] = "不能关注自己哦"
g_map_error["is_attention_same_sex"] = "不能关注同性哦"
g_map_error["had_attention_user"] = "您已经关注对方了哦, 不能重复关注"


g_map_error["is_hidden_love_myself"] = "不能仰慕自己哦"
g_map_error["is_hidden_love_same_sex"] = "不能仰慕同性哦"
g_map_error["had_hidden_love_user"] = "您已经仰慕对方了哦"


g_map_error["is_delete_attention_myself"] = "不能删除自己哦"
g_map_error["attention_not_my_list"] = "对方已经被您删除了哦"

g_map_error["room_is_pk"] = "约会房间正在PK状态中, 请稍候重试."
g_map_error["room_is_not_pk"] = "约会房间不是PK状态, 请稍候重试."
g_map_error["room_not_admit_exit"] = "约会房间不允许退出, 请稍候重试."
g_map_error["room_not_admit_addtime"] = "约会房间不允许续杯, 请稍候重试."

g_map_error["not_goods"] = "商品不足或不存在"
g_map_error['not_sell'] = "请保存形象后出售"
g_map_error['not_inlay'] = "镶嵌商品不存在"
g_map_error['must_sell_present'] = "请处理多余的礼品"

g_map_error['not_in_house'] = '不在房间'
g_map_error['is_steal'] = '您今天已拿过一次了 哦, 人不能贪得无厌哦!'
g_map_error['roomer_no_gold'] = '这个人很懒惰，一点储蓄都没有，您啥也没捞着'
g_map_error['roomer_saving_gold'] = '对方刚开始存钱，暂时还无钱可取，您过会儿再试试吧'
g_map_error['roomer_less_gold'] = '行行好吧，我所剩无几了!'
g_map_error['user_no_a'] = '房主未创建相册'
g_map_error['user_no_p'] = '房主未上传相片'
g_map_error['user_no_c'] = '相片没有评论'
g_map_error['no_record'] = '没有留言'
g_map_error['gold_is_saved'] = '你已经存过钱了'

g_map_error["use_props_need_enough_level"] = "等级不够哦"
g_map_error["use_props_need_pk"] = "道具仅限在插足场合下使用"
g_map_error["not_my_props"] = "我的道具不存在"
g_map_error["targe_use_props_cheeky"] = "对方使用了厚脸皮"
g_map_error["useing_same_props"] = "已使用了同类道具"
g_map_error["targe_use_is_only"] = "不能对主角使用哦"
g_map_error["targe_use_is_myself"] = "不能对自己使用哦"
g_map_error["useing_same_props_brooch"] = "已在T台排队咯哦, 请稍候再购买"

g_map_error['not_comment_self'] = '不能评论自己'
g_map_error['user_commented'] = '您已经评论过'
g_map_error['already_clean'] = '已经很干净了'
g_map_error['props_not_rew'] = '道具不能续费'

g_map_error['login_gift_has_get'] = "您的登陆礼物已经领取"
g_map_error['login_gift_has_see'] = "您的黄钻礼包已经查看"

g_map_error['not_yellow_user'] = "您不是黄钻用户"
g_map_error['not_yellow_vip'] = "您不是年费黄钻用户"

g_map_error['task_not_finish'] = "您的任务还没完成"
g_map_error['award_time_error'] = "现在不能领取了"

g_map_error["not_eloquence"] = "您的口才值不足"        #口才 
g_map_error["not_knowledge"] = "您的知识值不足"        #知识
g_map_error["not_constitution"] = "您的体制值不够"        #体质 
g_map_error["not_mood"] = "您的情绪值不够"        #情绪
g_map_error["not_appearance"] = "您的外貌值不够"        #外貌 

g_map_error["job_started"] = "您已经开始工作了"        #外貌 
g_map_error["no_job"] = "您没有此工作"        #外貌
def get_error(code):
    global g_map_error
    
    if g_map_error.has_key(code):
        return g_map_error[code]
    else:
        return ""     



#--用户所在模块-
g_user_current_place = {}

g_user_current_place["default"] = "default"           #"大街",

g_user_current_place["apartment"] = "apartment"       # "公寓试衣间";
g_user_current_place["house"] = "house"               # "房间";
g_user_current_place["house_other"] = "house_other"   # "他人房间";

g_user_current_place["bar"] = "bar"                   # "酒吧";
g_user_current_place["bar_room"] = "bar_room"         # "约会中房间";
g_user_current_place["bar_order"] = "bar_order"       # "会所";

g_user_current_place["store"] = "store"               # "商城";
g_user_current_place["hall_or_fame"] = "hall_or_fame" # "新版名人堂";

def get_place(strPlace):
    global g_user_current_place
            
    if not g_user_current_place.has_key(strPlace):
        strPlace = "default"        
    return g_user_current_place[strPlace]
